#ifndef numuCC1P1PiAnalysis_h
#define numuCC1P1PiAnalysis_h

#include "numuCCAnalysis.hxx"
#include "numuCC1P1PiSelection.hxx"

class numuCC1P1PiAnalysis: public baseAnalysis {
public:
    numuCC1P1PiAnalysis(AnalysisAlgorithm* ana=NULL);
    virtual ~numuCC1P1PiAnalysis(){}
    
    //---- These are mandatory functions
    void DefineSelections();
    bool Process();
    void DefineMicroTrees(bool addBase=true);
    void FillMicroTrees(bool addBase=true);
    void FillToyVarsInMicroTrees(bool addBase=true);
    void InitializeConfiguration();
    void DefineConfigurations();
    void DefineCorrections();
    void DefineSystematics();
    void DefineTruthTree();
    void FillTruthTree(const AnaTrueVertex& vtx);
    bool CheckFillTruthTree(const AnaTrueVertex& vtx);
    bool CheckFillRooTracker(const AnaTrueVertex& vtx);
    void InitializeToy();
    void FinalizeToy();
    
protected:
    
    AnaBoxCC1P1Pi* _cc1P1Pi_box;
    
    AnaBoxCC1P1Pi& box(){return *_cc1P1Pi_box;}
    
    numuCCAnalysis* _numuCCAnalysis;
    
public:
    enum enumStandardMicroTrees_numuCC1P1PiAnalysis{
        selmu_truedir = numuCCAnalysis::enumStandardMicroTreesLast_numuCCAnalysis + 1,
        //Proton selection variables
        selp_pdg, // true id
        selp_truemom,               // true proton momentum
        selp_truedir,  // true proton direction
        selp_mom,
        selp_dir,
        selp_NDOF,
        selp_Chi2,
        selp_endpos,
        selp_ntpcs,
        selp_tpc_nhits,
        selp_tpc_charge,
        selp_fgd_det,
        selp_nfgds,
        
        //Pion selection variables
        selpi_pdg, // true id
        selpi_truemom,               // true proton momentum
        selpi_truedir,  // true proton direction
        selpi_mom,
        selpi_dir,
        selpi_NDOF,
        selpi_Chi2,
        selpi_endpos,
        selpi_ntpcs,
        selpi_tpc_nhits,
        selpi_nfgds,
        selpi_tpc_charge,
        selpi_fgd_det
    };
};

#endif
